/*
 * @Author: your name
 * @Date: 2021-07-28 17:33:27
 * @LastEditTime: 2021-07-28 17:34:32
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /shb-pc-fe/src/modules/productV2/productView/components/methods/render.js
 */
import Vue from 'vue';

import CustomerEditView from '@src/modules/customer/editForModal/CustomerEditView.vue';

import { useNewVue } from '@hooks/useNewVue'
const { createVue } = useNewVue();

export default {
  /** 
   * @description 渲染客户表单
  */
  renderCustomerForm(data) {
    return createVue({
      el: '#createCustomerView',
      provide: {
        initData: Object.freeze(data)
      },
      components: {
        [CustomerEditView.name]: CustomerEditView
      },
      render(h) {
        return (
          <customer-edit-view ref="CustomerCreateView" />
        )
      }
    })
  },
}